package com.hj.homework;

public class Test3 {
    public static void main(String[] args) {
        User[] list = new User[15];
        for (int i = 0; i < list.length; i++) {
            list[i] = new User(null, i + 1);
        }
        Filter filter1 = (User u) -> u.setUserType("v1");
        for (int i = 0; i <5; i++) {
            filter1.filterUser(list[i]);
        }
        Filter filter2 = (User u) -> u.setUserType("v2");
        for (int i = 5; i <10; i++) {
            filter2.filterUser(list[i]);
        }
        Filter filter3 = (User u) -> u.setUserType("A");
        for (int i = 10; i <15; i++) {
            filter3.filterUser(list[i]);
        }
        for (User user : list) {
            System.out.println(user);
        }
    }
}
